function stripscript(s) {
    var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？-]")
    var rs = "";
    for (var i = 0; i < s.length; i++) {
        var str = s.substr(i, 1).replace(pattern, '');
        rs = rs + str.trim();
    }
    return rs;
}
stripscript('2021-10-11 15:22:45')